﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StudentMainPage.aspx.cs" Inherits="Presentation.StudentMainPage" MasterPageFile="~/Site.Master"%>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Panel ID="PanelStudentList" runat="server" Height="681px" Width="1088px">
        <fieldset style="width: 650px; height: 550px">
        <legend >Student List</legend>
        <br />
            <asp:Button ID="btnaddStudent" runat="server" Text="Create New Student" onclick="btnaddStudent_Click"  />
            <br />
            <br />
            <asp:GridView ID="gvStudentInfo" runat="server" 
                CellPadding="4" ForeColor="#333333" GridLines="None"  
                AutoGenerateColumns="False"  onrowdeleting="gvStudentInfo_RowDeleting" 
                onrowediting="gvStudentInfo_RowEditing"  DataKeyNames="StudentId" >
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                <Columns>
                    <asp:BoundField Datafield="StudentId" HeaderText="Student Id" />
                    <asp:BoundField Datafield="StudentName" HeaderText="Student Name" />
                    <asp:BoundField Datafield="StudentGender" HeaderText="Student Gender" />
                    <asp:BoundField Datafield="ClassName" HeaderText="Class Name" />
                    <asp:templatefield>
                        <itemtemplate>
                            <asp:button id="btnupdate" runat="server" causesvalidation="False" 
                                commandname="edit" text="Update" />
                        </itemtemplate>
                    </asp:templatefield>
                    <asp:TemplateField ShowHeader="False">
                        <ItemTemplate>
                            <asp:Button ID="btnDelete" runat="server" CausesValidation="False" 
                                CommandName="Delete" Text="Delete"   
                                onclientclick="javascript:return confirm('Are you sure all student info,including course details ')"  />
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                </Columns>
                <EditRowStyle BackColor="#999999" />
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <PagerSettings PageButtonCount="2" Position="TopAndBottom" />
                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <SortedAscendingCellStyle BackColor="#E9E7E2" />
                <SortedAscendingHeaderStyle BackColor="#506C8C" />
                <SortedDescendingCellStyle BackColor="#FFFDF8" />
                <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
            </asp:GridView>
            <br />
            <asp:LinkButton id="btnFirst"  Text="&lt;&lt; First" runat="server" OnClick="PageNavaigage_Click" CommandName="First" ></asp:LinkButton>
            <asp:LinkButton id="btnPre" Text="&lt; Previous" runat="server" OnClick="PageNavaigage_Click" CommandName="Previous" ></asp:LinkButton>
            <asp:LinkButton id="btnNext" Text="Next &gt" runat="server"  OnClick="PageNavaigage_Click" CommandName="Next"></asp:LinkButton>
            <asp:LinkButton id="btnLast" Text="Last &gt;&gt;" runat="server" OnClick="PageNavaigage_Click" CommandName="Last" ></asp:LinkButton>
            <asp:Label runat="server" id="lblRowsCount" BackColor="White" ForeColor="Black"></asp:Label> &nbsp;&nbsp;
            <asp:Label runat="server" ID="lblPagesIndex" BackColor="White"  ForeColor="Black"></asp:Label>
            <br />
            <br />
            <asp:Label runat="server" ID="Label2" Text="Go To：" BackColor="White" ForeColor="Black"></asp:Label>
            <asp:TextBox ID="txtSkipPage" runat="server"  Width="40px" MaxLength="4"></asp:TextBox>
            <asp:Label runat="server" ID="Label1" Text="Page" BackColor="White" ForeColor="Black"></asp:Label>
            <asp:Button ID="btnSkip" Text="Go" runat="server" OnClick="btnSkip_Click"></asp:Button>
            <asp:Label runat="server" ID="lblWarnMessage" BackColor="White"  ForeColor="Red"></asp:Label>
            <br />
            <br />
         <asp:TextBox ID="TextBox1" runat="server"  Width="40px"  Visible="false"></asp:TextBox>
        </fieldset>
        </asp:Panel>
</asp:Content>
